package com.company.card_service.mapper;

import com.company.card_service.model.Message;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.card_service.vo.MessageVo;
import com.company.card_service.vo.ViewCountVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 赵志浩
 * @since 2022-09-15 04:15:07
 */
@Mapper
public interface MessageMapper extends BaseMapper<Message> {

    List<ViewCountVo> findCount(long employeeId, String startDate, String endDate);

    //通过留言id分页查询
    public List<MessageVo> selectMessageVoById(@Param("eid") Integer eid, @Param("start") Integer start, @Param("limit") Integer limit);

    //通过message的employee_id查询不公开留言列表信息
    public List<MessageVo> selectNoPublicMessageVoById(@Param("eid") Integer eid, @Param("start") Integer start, @Param("limit") Integer limit);

    //通过message的employee_id查询公开留言列表信息
    public List<MessageVo> selectPublicMessageVoById(@Param("eid") Integer eid, @Param("start") Integer start, @Param("limit") Integer limit);

    //通过message的employee_id查询待回复留言列表信息
    public List<MessageVo> selectNoReplyMessageVoById(@Param("eid") Integer eid, @Param("start") Integer start, @Param("limit") Integer limit);

    //通过message的employee_id查询已回复留言列表信息
    public List<MessageVo> selectReplyMessageVoById(@Param("eid") Integer eid, @Param("start") Integer start, @Param("limit") Integer limit);

}
